<?php
class Pagination {
    //put your code here
    public function display($total, $pages) {
        $pages = $total/PER_PAGE;
        $html ="";
        $count =1;
        $html.=$pages;
        while ($count < PER_PAGE/2){
            if($pages + $count < $pages){
                $li = $pages + $count;
                $html = ''.$li;
            }
            if($pages - $count >0){
                $li = $pages - $count;
                $html = $li.' '.$html;
            }
        }
        return $html;
    }
}

?>
